package nc.ui.pu.plugin;

import nc.ui.pr.pray.PrayUI;
import nc.ui.pub.ButtonObject;
import nc.ui.pub.ToftPanel;
import nc.ui.pub.bill.BillCardPanel;
import nc.ui.pub.bill.BillEditEvent;
import nc.ui.pub.bill.BillListPanel;
import nc.ui.querytemplate.QueryConditionDLG;
import nc.ui.scm.plugin.IUIPluginToftPanel;
import nc.ui.scm.plugin.UIPluginFactory;
import nc.vo.pub.AggregatedValueObject;
import nc.vo.pub.BusinessException;

public class PrayPluginIn implements IUIPluginToftPanel {
	private PrayUI prayUI;
	
	public PrayUI getPrayUI() {
		return prayUI;
	}
	public void setPrayUI(PrayUI prayUI) {
		this.prayUI = prayUI;
	}
	public PrayPluginIn(PrayUI prayUI){
		this.prayUI=prayUI;
	}
	public void callAfterEdit(BillEditEvent e) {
		getPrayUI().afterEdit(e);
	}

	public void callOnButtonClicked(ButtonObject bo) {
		getPrayUI().onButtonClicked(bo);
	}

	public ButtonObject getButton(String btncode) {
		return UIPluginFactory.getIntance().findButtonObject(getPrayUI().getButtons(),btncode);
	}

	public BillCardPanel getCardPanel() {
		return getPrayUI().getBillCardPanel();
	}

	public BillListPanel getListPanel() {
		return getPrayUI().getBillListPanel();
	}

	public QueryConditionDLG getQueryDlg(BillEditEvent e) {
		return null;
	}

	public ToftPanel getToftPanel() {
		return getPrayUI();
	}

	public int getUIOperateState() {
		return 0;
	}

	public int getUIShowState() {
		return 0;
	}

	public void onAddNewBillToUI(String biztype, AggregatedValueObject[] billvos)
			throws BusinessException {

	}

	public void setBillVOsToUI(AggregatedValueObject[] billvos) {

	}

}
